Home / Data table / Create row

Data table ‐ Create row


Creating a new row in a specifc api data table. A api data table is a table where the option is enables to change the data table trough the api.

Endpoint

POST /api/datatable/create/:dataTable

Parameters:

:dataTable (string) - name of the table within which the search is done

Headers

Payload

Payload should be JSON object with the data of the updated row. It has to contain values for all the mandatory fields of the data table.

Response

        {
          "valid": true,
          "data": null
        }

Example code:

<?php

require_once 'RestOpen.php';

$username = 'my_username';
$password = 'my_password';
$workspaceId = 999;
$tableName = 'your_table_name';
$insertValues = array(
'column_name_1'=>'column_value_1',
'column_name_2'=>'column_value_2'
);

$rest = new RestOpen($username, $password, $workspaceId);
$result = $rest->postDataTableNewRow($tableName, $insertValues);

var_dump($result)